<%--
  Created by IntelliJ IDEA.
  User: jshand
  Date: 2022-10-25
  Time: 10:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    pageContext.setAttribute("pageKey","pageValue");


    // pageContext.findAttribute("key")

%>




${pageScope.pageKey}: ${pageScope.pageKey} <br>
${pageKey} : ${pageKey} <br>
<hr>

request.getParameter("name"): <%=request.getParameter("name")%> <br>
request.getParameterValues("name")[0]: <%=request.getParameterValues("name")[0]%> <br>
request.getParameterValues("name")[1]: <%=request.getParameterValues("name")[1]%> <br>
$ {param.name}:  ${param.name} <br>
$ {param.age}:  ${param.age} <br>

$ {paramValues.name[0]} : ${paramValues.name[0]} <br>
$ {paramValues.name[1]} : ${paramValues.name[1]} <br>

<hr>
request.getHeader("User-Agent") : <%=request.getHeader("User-Agent")%> <br>
<hr>
$ {header} : ${header} <br>
<hr>
$ {header.Connection} : ${header.Connection} <br>
$ {header['User-Agent']} : ${header['User-Agent']} <br>

$ { headerValues['User-Agent'][0]}  : ${       headerValues['User-Agent'][0]    } <br>


$ {initParam['contextUsername']} :  ${initParam['contextUsername']} <br>


<%
    Cookie[] cookies = request.getCookies();
%>

${cookie} : ${cookie} <br>

<hr>
$ {cookie.JSESSIONID} :  ${cookie.JSESSIONID} <br>
$ {cookie.JSESSIONID.name} :  ${cookie.JSESSIONID.name} <br>
$ {cookie.JSESSIONID.value} :  ${cookie.JSESSIONID.value} <br>


<hr>
${pageContext.request.contextPath} : ${pageContext.request.contextPath}

<form action="${pageContext.request.contextPath}" method="post"></form>
<form action="<%=request.getContextPath()%>" method="post"></form>


</body>
</html>
